POV-Ray : Newsgroups : povray.binaries.animations : snow animations : Re: snow animations Server Time
5 Jul 2024 10:01:41 EDT (-0400)
  Re: snow animations  
From: r20adek
Date: 29 Dec 2005 18:00:01
Message: <web.43b4698b37e0571554272d270@news.povray.org>
Can you tell me what I must do when snowflakes is animated??Because I'm vey
newbie and I don't now what I must do??????

#include "textures.inc"
#include "colors.inc"
#include "rand.inc"
plane
     {
        <0,1,0>,10000 hollow

      texture

             {

              pigment

              {color rgb<0.2,0.2,0.3>}

              finish

              {ambient 1  diffuse 0}
}
}

plane
     {
        <0,1,0>,1 hollow  //
      texture
            {
            pigment
                  {
                   bozo
                   turbulence 0.65
                        octaves 6  omega 0.7 lambda 2
                        color_map { [0.0 color rgb <0.95, 0.95, 0.95>]
                                    [0.1 color rgb <0.85, 0.85, 0.85>]
                                    [0.5 color rgbt <1, 1, 1, 1> ]
                                    [1.0 color rgbt <1, 1, 1, 1> ]   }
                        rotate<10,20,0>
                        scale <0.3, 0.4, 0.2>*3 }
              finish
                    {
              ambient 1 diffuse 0}}
      scale 1000}
// fog at the horizon
fog
   {
   distance 300000 color White}


sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}
  fog {
        fog_type 2 // tu określamy typ mgły
        fog_alt 1 // tu okreslamy jak szybko mgla ma malec
        fog_offset 0
        distance 2
        color <0.6,0.5,0.5>
}


light_source
           {
           <-400,2500,-1000> colour White}
plane
     {
       y,0 pigment
                 {colour White}
                 finish
                 {phong 1}
      }
camera
      {
      location <10,10,-50>
      look_at <0,22,0>
      }
light_source
            {
               <0,10,-6>
               colour White
             }
        sphere
              {
                 <-30,8,20>
                 9 pigment
                         {colour White}
                          finish
                          {reflection 0 phong 0}
               }
 sphere
       {
           <-27,6,13>
           1.5 pigment
                      {colour Yellow}
                      finish
                      {reflection 0 phong 0}
       }
 sphere
         {
             <-27,10,13>
             1.5 pigment
                        {colour Yellow}
                        finish
                        {reflection 0 phong 0}
          }
 sphere
       {
           <-27.4,14.5,14>
           1.2 pigment
           {colour Yellow}
           finish
           {reflection 0 phong 0}
        }
        sphere
               {
                   <-28,21.9,15>
                   7.8 pigment
                   {colour White}
                   finish
                   {reflection 0 phong 0}
                }
  sphere
        {
            <-24.7,16,8.4>
            1 pigment
            {colour Yellow}
            finish
            {reflection 0 phong 0}
         }
  sphere
        {
            <-24.5,20,8>
            1 pigment
            {colour Yellow}
            finish
            {reflection 0 phong 0}
         }
  sphere
         {
             <-20.7,22.5,1>
             0.9 pigment
             {colour Yellow}
             finish
             {reflection 0 phong 0}
          }
        sphere
               {
                   <-26.3,33,9>
                   6 pigment
                   {colour White}
                   finish
                   {reflection 0 phong 0}
                }


     union
          {

  cone
       {
          <-20.3,27,0>
          1
          <-20,22,0>
          0
}
  pigment
         {colour Red}
}
sphere
      {
          <-25,32,2>
          0.9 pigment
          {colour Blue}
          finish
          {reflection 0 phong 0}
}
sphere
      {
          <-20,31.5,2>
          0.9 pigment
          {colour Blue}
          finish
          {reflection 0 phong 0}
}
cylinder
        {
             <-24,45,2>   <-24,35,5>
             5 texture
             {
               pigment
               {Black}
              }
}





#declare PtA=<-30,0,-30>;
#declare PtB=<30,35,15>;
#declare nasio=seed(12345);

#declare FallVector = <-0.1,-1,-0.1>;

#declare ile=1000;
#declare licz=1;
#declare platek=sphere
{
  <0,0,0>,
  .1 pigment
  { color White }
}

#while
     (licz <ile)
        #declare los=VRand_In_Box(PtA, PtB, nasio);
        #declare los = los+FallVector*clock*35;
        #if (los.y<=0) #declare los = los-FallVector*35; #end
        object { platek translate los }
        #declare licz=licz+1;
#end


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.